import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '补偿发放ID',
    align:"center",
    dataIndex: 'fundsId'
   },
   {
    title: '补偿项ID',
    align:"center",
    dataIndex: 'compensateItemId'
   },
   {
    title: '补偿项名称',
    align:"center",
    dataIndex: 'compensateItemName'
   },
   {
    title: '财评金额',
    align:"center",
    dataIndex: 'cpAmt'
   },
   {
    title: '已拔入金额',
    align:"center",
    dataIndex: 'payAmt'
   },
   {
    title: '未拔金额',
    align:"center",
    dataIndex: 'unPayAmt'
   },
   {
    title: '拔入金额',
    align:"center",
    dataIndex: 'amt'
   },
   {
    title: 'compensateItemCode',
    align:"center",
    dataIndex: 'compensateItemCode'
   },
   {
    title: 'remark',
    align:"center",
    dataIndex: 'remark'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '补偿发放ID',
    field: 'fundsId',
    component: 'Input',
  },
  {
    label: '补偿项ID',
    field: 'compensateItemId',
    component: 'Input',
  },
  {
    label: '补偿项名称',
    field: 'compensateItemName',
    component: 'Input',
  },
  {
    label: '财评金额',
    field: 'cpAmt',
    component: 'InputNumber',
  },
  {
    label: '已拔入金额',
    field: 'payAmt',
    component: 'InputNumber',
  },
  {
    label: '未拔金额',
    field: 'unPayAmt',
    component: 'InputNumber',
  },
  {
    label: '拔入金额',
    field: 'amt',
    component: 'InputNumber',
  },
  {
    label: 'compensateItemCode',
    field: 'compensateItemCode',
    component: 'Input',
  },
  {
    label: 'remark',
    field: 'remark',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

// 高级查询数据
export const superQuerySchema = {
  fundsId: {title: '补偿发放ID',order: 0,view: 'text', type: 'string',},
  compensateItemId: {title: '补偿项ID',order: 1,view: 'text', type: 'string',},
  compensateItemName: {title: '补偿项名称',order: 2,view: 'text', type: 'string',},
  cpAmt: {title: '财评金额',order: 3,view: 'number', type: 'number',},
  payAmt: {title: '已拔入金额',order: 4,view: 'number', type: 'number',},
  unPayAmt: {title: '未拔金额',order: 5,view: 'number', type: 'number',},
  amt: {title: '拔入金额',order: 6,view: 'number', type: 'number',},
  compensateItemCode: {title: 'compensateItemCode',order: 7,view: 'text', type: 'string',},
  remark: {title: 'remark',order: 8,view: 'text', type: 'string',},
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}